{include file="public/header" /}
<style>
	.remark{margin-left: 150px;margin-top: 8px;color: #868686;font-size: 13px;}
	.suffix_div{float: left;width: 20%}
	.suffix_span{float: left;margin-top: .7rem}

</style>
</head>
<body>
<div class="x-nav layui-row">
	<span class="layui-breadcrumb layui-col-md9 layui-col-sm9">
		<!-- <a href="javascript:;">首页</a> -->
		<!-- {if $_page_navi.0}<a href="javascript:;">{$_page_navi.0.NavName}</a>{/if} -->
		<!-- {if $_page_navi.1} -->
		<a><cite>{$_page_navi.1.title}</cite></a>
	</span>
	<a class="layui-btn layui-btn-small" style="float:right" href="javascript:location.replace(location.href);" title="刷新"><i class="layui-icon">&#xe9aa;</i></a>
</div>
<div class="x-body">
	<div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
		<ul class="layui-tab-title">
			{foreach name=":get_config_group()" item="group" key="key"}
			{if $group != '系统' && $group != '支付' && $group != '转换' && $group != '互转'}
			<a href="{:url('?id='.$key)}"><li {eq name="$id" value="$key"}class="layui-this"{/eq}>{$group}配置</li></a>
			{/if}
			{/foreach}
		</ul>
		<div style="height: 10px;"></div>
		<form action="{:url('Config/save_group')}" method="post" class="layui-form layui-form-pane" id="form">
			{volist name="list" id="config"}

			<div class="layui-form-item  layui-col-md8" style="margin-bottom: 20px;">
				<label class="layui-form-label" style="width: 150px;">{$config.title}：</label>
					{switch name="config.type"}
					{case value="8"}
					<div class="layui-input-block left_div" style="margin-left: 150px;" >
						{if $config.suffix}
							{if $config.suffix == '%'}
							<input type="number" class="layui-input suffix_div" name="config[{$config.name}]" value="{$config.value*100}">
							{else}
							<input type="number" class="layui-input suffix_div" name="config[{$config.name}]" value="{$config.value}">
							{/if}
						<span class="suffix_span">&nbsp;&nbsp;{$config.suffix}</span>
						{else}
						<input type="number" class="layui-input" name="config[{$config.name}]" value="{$config.value}">
						{/if}
					</div>
					<div class="remark" >
						<span>* {$config.remark}</span>
					</div>
					{/case}
					{case value="1"}
					<div class="layui-input-block"  style="margin-left: 150px;">
						{if $config.suffix}
						<input type="text" class="layui-input suffix_div" name="config[{$config.name}]" value="{$config.value*100}">
						<span class="suffix_span">&nbsp;&nbsp;{$config.suffix}</span>
						{else}
						<input type="text" class="layui-input" name="config[{$config.name}]" value="{$config.value}">
						{/if}
					</div>
					<div class="remark" >
						<span>* {$config.remark}</span>
					</div>
					{/case}
					{case value="2"}
					<div class="layui-input-block" style="margin-left: 150px;">
						<textarea class="layui-textarea" type="text" rows="4" name="config[{$config.name}]">{$config.value}</textarea>
					</div>
					<div class="remark" >
						<span>* {$config.remark}</span>
					</div>
					{/case}
					{case value="3"}
					<div class="layui-input-block" style="margin-left: 150px;">
						<textarea class="layui-textarea" type="text" rows="4" name="config[{$config.name}]">{$config.value}</textarea>
					</div>
					<div class="remark" >
						<span>* {$config.remark}</span>
					</div>
					{/case}
					{case value="4"}
					<div class="layui-input-block" >
						<div class="layui-input-inline">
							<select name="config[{$config.name}]">
								{volist name=":parse_config_attr($config['extra'])" id="vo" }
								<option {eq name="config.value" value="$key"}selected{/eq} value="{$key}">{$vo}</option>
								{/volist}
							</select>
						</div>
					</div>
					<div class="remark" >
						<span>* {$config.remark}</span>
					</div>
					{/case}
					{case value="5"}
					<div class="layui-input-block" style="margin-left: 150px;">
						<script id="config[{$config.name}]" name="config[{$config.name}]" class="editor" style="width:100%;height:240px;" type="text/plain">{$config.value}</script>
					</div>
					<div class="remark" >
						<span>* {$config.remark}</span>
					</div>
					{/case}
					{case value="6"}
					<div class="layui-input-block" style="margin-left: 150px;">
						<div class="layui-upload" >
							<a href="{$config.value}" target="_blank">
								<img class="layui-upload-img showImage" src="{$config.value}"/>
							</a>
							<input type="hidden" name="config[{$config.name}]" value="{$config.value}" class="inpImage"/>
							<button type="button" class="layui-btn uploadImage" >上传图片</button>
						</div>
					</div>
					<div class="remark" >
						<span>* {$config.remark}</span>
					</div>
					{/case}
					{case value="7"}
					<div class="layui-input-block" style="margin-left: 150px;">
						<?php $format = explode('_',$config['format']);?>
						<input type="text" class="layui-input config_laydate" data-format-1="{$format[0]}" data-format-2="{$format[1]}" name="config[{$config.name}]" value="{:get_layDate($config['value'],$config['format'])}" style="width: 40%">
					</div>
					<div class="remark" >
						<span>* {$config.remark}</span>
					</div>
					{/case}
					{case value="9"}
					<?php $val = explode(',',$config['value']);?>
					<div class="layui-input-block left_div" style="margin-left: 150px;" >
						<input type="text" class="layui-input suffix_div" name="config[{$config.name}]" value="{$val[0]}">
						<span class="suffix_span">&nbsp;&nbsp; - &nbsp;&nbsp; </span>
						<input type="text" class="layui-input suffix_div" name="config[{$config.name}_2]" value="{$val[1]}">
						<span class="suffix_span">&nbsp;&nbsp; 元 &nbsp;&nbsp; </span>
					</div>
					<div class="remark" >
						<span>* {$config.remark}</span>
					</div>
					{/case}
					{/switch}
			</div>
			{/volist}

			<div class="layui-form-item layui-col-md8" style="text-align: center;padding-bottom: 2%">
				<button class="layui-btn" lay-filter="save" lay-submit formObj="#form">保存</button>
			</div>
		</form>
	</div>
</div>
</body>
</html>